package com.echatim.controller.professional.mock;

import com.echatim.form.SocketHideProtocolMessage;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author kong <androidsimu@163.com>
 * create by 2020/10/12 17:29
 * Description: easyim
 **/

@JsonIgnoreProperties(ignoreUnknown = true)
@NoArgsConstructor
@Accessors(chain = true)
@Data
public class UserRegisterForm extends SocketHideProtocolMessage {
    @NotBlank(message = "appKey不能为空")
    private String appKey = ""; // appKey
    @Pattern(regexp = "[0-9]{11}", message = "不是有效的手机号码")
    @NotBlank(message = "用户手机号不能为空")
    private String mobile = ""; // 用户手机号
    @Length(min = 6, max = 20, message = "用户密码为6-20位")
    @NotBlank(message = "用户密码不能为空")
    private String password = ""; // 用户密码
    @NotBlank(message = "验证码不能为空")
    private String validatedCode = ""; // 验证码
    @NotNull(message = "验证码ID不能为空")
    private Integer validatedCodeId = 0; // 验证码ID
    @NotBlank(message = "用户昵称不能为空")
    private String name = ""; // 用户昵称
}
